package com.ftg.learn.chapter12.core;

import com.ftg.learn.chapter09.base02.annotation.Id;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Component;

/**
 * spring aop  ：
 *    aop : 面向切面编程
 *  目标类
 * @author 布衣
 */
@Component
public class SpringAop {

    //切点

    public void test1(){
        System.out.println("hello");
    }

    public static void main(String[] args) {
        AnnotationConfigApplicationContext b = new AnnotationConfigApplicationContext();
        b.scan("com.ftg.learn.chapter12.core");
        b.refresh();
        SpringAop bean = b.getBean(SpringAop.class);
        bean.test1();
    }

}
